<div id="content">
    <div id="title_content">Ảnh của album <b><i><?php echo $album_name; ?></i></b></div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <form method="POST" action="<?php echo site_url('admin_media/delete_multi_medias'). '/'. $per_page . '/' . $off_set; ?>" onsubmit="return go();">
            <table class="list" width="100%">
                <thead>
                    <tr>
                        <th width="20px"><input type="checkbox" name="deleteall" id="deleteall"/></th>
                        <th width="10%"></th>
                        
                        <th>Ngày đăng lên</th>
                        
                        <th colspan="2">Tác vụ</th>
                    </tr>
                </thead>
                <tbody>
                <?php foreach ($images as $aRow): ?>
                    <?php
                        $image_path = './assets/images/media/' . $aRow['file_path'];
                        if ($aRow['file_path'] != '') {
                            if (file_exists($image_path)) {
                                $image_path = base_url() . 'assets/images/media/' . $aRow['file_path'];
                            } else {
                                $image_path = base_url() . 'assets/images/no_image/noimage.jpg';
                            }
                        }  else {
                            $image_path = base_url() . 'assets/images/no_image/noimage.jpg';
                        }
                        $file_title = "NULL"; 
                        if($aRow['title'] != NULL){
                            $file_title = $aRow['title'];    
                        }
                       
                       
                    ?>
                    <tr>
                        <td><input type="checkbox" name="delete[]" value="<?php echo $aRow['id'] ?>" class="delete" /></td>
                        
                        <td><img src="<?php echo $image_path; ?>" alt="" width="200px" height="100px"/></td>
                        <td><?php echo mdate('%d/%m/%Y', $aRow['upload_time']); ?></td>
                       
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('admin_media/delete_media/' . $aRow['id']. '/' . $per_page . '/' . $off_set) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
            <div class="delete_button">
                <table width="100%">
                    <tr>
                        <td align="left" width="200px" ><input type="submit" class="form_submit" value="Xóa" name="submit" onClick="return confirm('bạn có muốn xóa không ?');"/></td>
                        <td align="right"><?php echo $pagination; ?></td>
                </tr>
            </table>
        </div>
        <!--END delete_button-->
    </form>
</div>
<!--END content-->
